#ifndef tsharkDataType_hpp
#define tsharkDataType_hpp

#include <string>

struct Packet
{
    int         frame_number; // 数据包编号
    double      time;         // 数据包的时间戳
    uint32_t    cap_len;
    uint32_t    len;
    std::string src_mac;
    std::string dst_mac;
    std::string src_ip; // 源IP地址
    std::string src_location;
    uint16_t    src_port;
    std::string dst_ip; // 目的IP地址
    std::string dst_location;
    uint16_t    dst_port;
    std::string protocol;
    std::string info; // 数据包的概要信息
    uint32_t    file_offset;
};

// PCAP全局文件头
struct PcapHeader
{
    uint32_t magic_number;
    uint16_t version_major;
    uint16_t version_minor;
    int32_t  thiszone;
    uint32_t sigfigs;
    uint32_t snaplen;
    uint32_t network;
};

// 每一个数据报文前面的头
struct PacketHeader
{
    uint32_t ts_sec;
    uint32_t ts_usec;
    uint32_t caplen;
    uint32_t len;
};

struct AdapterInfo
{
    int         id;
    std::string name;
    std::string remark;
};

#endif